package gui;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;

import common.ChatIF;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import javax.swing.JComboBox;
/**
 * 
 * @author Chen Parodi
 * This GUI Class services the all those who need to set number of days needed for finishing the task,
 *  *
 */
public class SetTaskDuration extends JPanel implements ChatIF{
	String pid;
	String request;
	AcademicFrame frame;
	JPanel panel; // JPanel for reuse of code
	ViewRequestPanel viewRequest;
	ArrayList<Object> message;
	private SetTaskDuration myself;
	
	
	public SetTaskDuration(AcademicFrame frame,JPanel panel, String pid) {
		super();
		this.pid=pid;
		this.frame=frame;
		this.panel=panel;
		this.myself = this;
		frame.setSize(500, 500);
		initialize();
	}
	
	private void initialize() {
		setLayout(null);
		
		JLabel lblSetAssessDuration = new JLabel("Duration For Task");
		lblSetAssessDuration.setFont(new Font("Tahoma", Font.BOLD, 28));
		lblSetAssessDuration.setBounds(29, 24, 336, 42);
		add(lblSetAssessDuration);
		
		JLabel label = new JLabel("________________________________________________");
		label.setBounds(29, 52, 387, 14);
		add(label);
		
		
		
		
		
		JLabel lblSetNumberOf = new JLabel("Number of days for completing the task");
		lblSetNumberOf.setBounds(28, 173, 291, 14);
		add(lblSetNumberOf);
		
		//btnViewRequest = new JButton("View request");
		//btnViewRequest.addActionListener(new ActionListener() {
		//	public void actionPerformed(ActionEvent e) {
		//	}
		//});
	/*	
		btnViewRequest.addActionListener(new ActionListener() 
		{
			public void actionPerformed(ActionEvent e)
			{
				System.out.println("Rid for view is " + 7);
				viewRequest = new ViewRequestPanel(request,frame,myself);
				frame.setSize(550, 820);
				frame.setContentPane(viewRequest);
				
			}
		});
		*/
		//btnViewRequest.setBounds(158, 253, 130, 23);
		//add(btnViewRequest);
		
		JButton btnCancel = new JButton("Cancel");
		btnCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				frame.setSize(500, 500);
				frame.setContentPane(panel);	
				//return to previous panel
			}
		});
		btnCancel.setBounds(18, 253, 130, 23);
		add(btnCancel);

		
		JLabel lblRequest = new JLabel("Request#");
		lblRequest.setBounds(29, 115, 68, 14);
		add(lblRequest);
		
		
	}
	public void display(Object message){
		
		
	}
}
